package com.itboy.mall.wms.warepurchasedetail.service;

import com.itboy.mall.wms.warepurchasedetail.bo.PurchaseDetailBo;
import com.itboy.mall.wms.warepurchasedetail.domain.MallWarePurchaseDetail;
import com.itboy.mall.wms.warepurchasedetail.vo.MallWarePurchaseDetailVo;
import com.itboy.mall.wms.warepurchasedetail.bo.MallWarePurchaseDetailQueryBo;
import com.itboy.mall.wms.warepurchasedetail.bo.MallWarePurchaseDetailAddBo;
import com.itboy.mall.wms.warepurchasedetail.bo.MallWarePurchaseDetailEditBo;
import com.itboy.common.core.mybatisplus.core.IServicePlus;
import com.itboy.common.core.page.TableDataInfo;

import java.util.Collection;
import java.util.List;

/**
 * 采购需求
Service接口
 *
 * @author itboy
 * @date 2021-08-10
 */
public interface IMallWarePurchaseDetailService extends IServicePlus<MallWarePurchaseDetail> {
	/**
	 * 查询单个
	 * @return
	 */
	MallWarePurchaseDetailVo queryById(Long id);

	/**
	 * 查询列表
	 */
    TableDataInfo<MallWarePurchaseDetailVo> queryPageList(MallWarePurchaseDetailQueryBo bo);

	/**
	 * 查询列表
	 */
	List<MallWarePurchaseDetailVo> queryList(MallWarePurchaseDetailQueryBo bo);

	/**
	 * 根据新增业务对象插入采购需求
	 * @param bo 采购需求新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(MallWarePurchaseDetailAddBo bo);

	/**
	 * 根据编辑业务对象修改采购需求
	 * @param bo 采购需求编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(MallWarePurchaseDetailEditBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

	/**
	 * 合并分配采购单
	 * @param bo
	 * @return
	 */
	Boolean mergeAssignPurchaseOrder(PurchaseDetailBo bo);

}
